<template>
    <div class="header">

        <input type="text" placeholder="请评论" v-model="content" autofocus autocomplete="off" />
        <button @click="pub">发布</button>
    </div>
</template>

<script setup>
import { ref } from 'vue'
import useCommentStore from '../store/module/comment'
const commentStore = useCommentStore()

const content = ref('')

const pub = () => {
    commentStore.pub(content.value)
    content.value = ''
}
</script>

<style>
.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.header input {
    height: 40px;
    outline: 0;
}

.header button {
    width: 80px;
    /* flex: 1; */
}
</style>